<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <script type="text/javascript" src=" http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js" ></script>
    <script type="text/javascript" src="http://china-addthis.googlecode.com/svn/trunk/addthis.js" charset="UTF-8"></script>
    <script type="text/javascript">
	    $(function(){
	        if(getCookie("city"))
	        {
	          var city =getCookie("city");
	          $("#currentCity").text(city);
	          address=city;
			  searchStr=$(".body a:contains('"+city+"')").attr("name");
	        }else
	        {
	           $("#currentCity").text(remote_ip_info.city);
	           address=remote_ip_info.city;
			   searchStr=$(".body a:contains('"+remote_ip_info.city+"')").attr("name");
	        }
		});
    </script>
  </head>
  <body>
    <div id="headbg">
		<div id="head">
			<div id="head_l">
				<div class="logo">
				<a ></a>
				</div>
				<div class="logo_r">
					<h1>选择城市</h1>
					<div class="city">
						<ul>
							<li class="xz_01"><a href="javascript:void(0);"  id="currentCity" onclick="dialog(2,'city.html');">上海</a></li>
						</ul>
					</div>
				</div><!--end.logo_r-->
				<div class="clear"></div>
			</div><!--end#head_l-->
			<div id="head_r">
					<h2><a href="user/register.jsp">注册</a>|
					<s:if test="#session.user == null"> 
					    <a href="user/login.jsp">登录</a>
					</s:if>
					<s:else>
					    <a href="user!loginOut.action">退出</a>
					</s:else>
					
					</h2>
					<ul>
					<li><a href="#"><span class="addthis_org_cn">
					     <a i="22|23|28|48|49|21|43" 
						    e="click"
						    u="http://www.metasoo.com/" 
						    href="http://addthis.org.cn/share/" 
						    side="top" 
						    top="150" 
						    abordercolor="#DDD" 
						    aheadbgcolor="#F2F2F2"
						     title="收藏&amp;分享">
						        <img src="http://addthis.org.cn/images/a1.gif" align="absmiddle" />  
						    </a>
					    
					 </span></li>
					</ul>
			</div>
        <div class="clear"></div>
		</div><!--end#head-->
    </div><!--end#headbg--> 
    <div class="clear"></div>   	
	<div id="nav">
    	<span><a href="#">推荐</a><a href="#">加入</a></span>
    	<ul>
        	<li><a href="/hipresent">首页</a></li>
            <!--
            <li><a href="index.html">首页</a></li>
            <li><a href="index.html">首页</a></li>
            <li><a href="index.html">首页</a></li>
            -->
        </ul>
    </div>
    <div id="citydialog" style="display:none;position: absolute;width:auto;height:auto;top: 50%;   z-index: 5; left: 50%;margin-left:-335px;margin-top:-200px;">
         <div id="citiesBox">
			<div id="cities_popup" class="horizon popupCities canDisable escDisable outerClickDisable" style="z-index: 999; display: block;">
			<h4>请选择您的城市<a id="close_cities_popup" href="javascript:void(0);" onclick="$('#citydialog').hide();"></a></h4>
			<div class="body_wrap">
			  <div class="body">
			    <s:iterator value="#application.citylist" id="id">
			        <dl style="background: none repeat scroll 0% 0% rgb(255, 255, 255);">
			          <dt><s:property value="#id.key.split('_')[1]"/></dt>
			          <dd> 
			             <s:iterator value="#id.value" >
			                <a href="javascript:void(0);" name="<s:property value="#id.key.split('_')[0]"/>_<s:property value="id"/>" onclick="selectCity('<s:property value="#id.key.split('_')[0]"/>_<s:property value="id"/>','<s:property value="#id.key.split('_')[1]"/><s:property value="city"/>','<s:property value="city"/>')"><s:property value="city"/></a>
			             </s:iterator>
			          </dd>
			        </dl>
			    </s:iterator>
			  </div>
			</div>
			<div class="foot"></div>
			</div>
			</div>
    </div>
  </body>
</html>
